load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//rs/crypto:__subpackages__"])

rust_library(
    name = "bls12_381",
    srcs = glob(["src/**"]),
    crate_name = "ic_crypto_internal_multi_sig_bls12381",
    version = "0.9.0",
    deps = [
        # Keep sorted.
        "//rs/crypto/internal/crypto_lib/bls12_381/type",
        "//rs/crypto/internal/crypto_lib/types",
        "//rs/crypto/secrets_containers",
        "//rs/crypto/sha2",
        "//rs/protobuf",
        "//rs/types/types",
        "@crate_index//:base64",
        "@crate_index//:hex",
        "@crate_index//:rand",
        "@crate_index//:rand_chacha",
        "@crate_index//:serde",
        "@crate_index//:zeroize",
    ],
)

rust_test(
    name = "bls12_381_test",
    crate = ":bls12_381",
    deps = [
        # Keep sorted.
        "//rs/crypto/internal/test_vectors",
        "//rs/crypto/test_utils/reproducible_rng",
        "@crate_index//:proptest",
        "@crate_index//:serde_cbor",
    ],
)
